<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ include file="/header.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<p align="right">
	您好！${loginUser.username}
	<a href="${ctx}/user/editUserPassword.jsp">修改密码</a> 
	<a href="${ctx}/user/manager?func=logout">退出</a> 
	</p>
    <center> 
	<a href="${ctx}/user/addUser.jsp">增加管理员</a>  
	<a href="${ctx}/message/manager?func=all">显示留言</a>&nbsp;&nbsp;&nbsp;&nbsp;
	<br>
	<table border="1">
		<tr>
			<td>登录名</td>
			<td>密码</td>
			<td>用户类别</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${list}" var="obj">
		<tr>
			<td>${obj.username}</td>
			<td>${obj.password}</td>
			<td>
			<c:if test="${obj.roleId==1}">
			管理员
			</c:if>
			<c:if test="${obj.roleId==2}">
			普通用户
			</c:if>
			<td>
				<a href="${ctx}/user/manager?func=edit&id=${obj.id}">修改</a>
				<a href="${ctx}/user/manager?func=delete&id=${obj.id}">删除</a>
			</td>
		</tr>
		</c:forEach>
	</table>
	</center>

</body>
<%@ include file="/footer.htm" %>

</html>